Called when user clicks form's button.

<div class="definition">
    action(action, [event])
</div>

<div class="arguments">
    <table>
    <tr>
        <td>action</td>
        <td><b>string</b>, name of the action (name of the button)</td>
    </tr>
    <tr>
        <td>event</td>
        <td><b>object</b>, DOM Event Object (<i>optional</i>)</td>
    </tr>
    </table>
</div>

Returns <i>undefined</i>.

<h4>Description</h4>

The first argument <span class="argument">action</span> is the name of the action (name of the button). The second
argument <span class="argument">event</span> is DOM event object. This method does not do anything besides calling
appropriate action handler from the <a class="method" href="w2form.actions">.actions</a> object and triggering
<a class="method" href="w2form.onAction">.onAction</a> event. When form initializes it adds <span class="argument">action</span>
on click event to all buttons in the form.
<div style="height: 10px"></div>

If you have form defined in the following way:
<textarea class="javascript">
let form = new w2form({
    name     : 'form',
    formURL  : '/server/path',
    fields: [
        { field: 'first_name', type: 'text', required: true },
        { field: 'last_name', type: 'text', required: true },
        { field: 'email', type: 'email' }
    ],
    actions: {
        "save": function (target, data) { this.validate(); },
        "reset": function (target, data) { this.clear(); }
    }
});
</textarea>

You can do:
<textarea class="javascript">
w2ui.form.action('reset');
</textarea>